<template>
  <div id="ap">
    <input type="button" value="切换裁切" @click="canCrop=!canCrop">
    <editor ref="myTextEditor"
            :fileName="'file'"
            :canCrop="canCrop"
            :uploadUrl="uploadUrl"
            v-model="content"></editor>
    <div v-html="content"></div>
  </div>
</template>
<script>
  import editor from './text/Quilleditor.vue'
  import Public from '../vuex/public.js'
  export default {
    name: 'ap',
    data(){
      return {
        canCrop:false,
        /*测试上传图片的接口，返回结构为{url:''}*/
        uploadUrl: Public.api+'/portal/file/upload',
        content:''
      }
    },
    components: {
      editor
    }
  }
</script>
